import { defineStore } from 'pinia'

const wgStore = defineStore("wg", {
  state: () => {
    return {
      // 记录当前选择的wg的id
      wgId: 0,
      showAddForm: false
    }
  },
  actions: {
    updateWgId(id) {
      this.wgId = Number(id)
    },
    updateShowAddForm(e) {
      this.showAddForm = e
    },
  },
  getters: {
    getWgId(state) {
      return state.wgId
    }
  }
})

export default wgStore